projects
/
babl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
afc32d4
)
extensions: change the range of H in HSV.o from 0..360 to 0..1
author
Michael Natterer
<mitch@gimp.org>
Sun, 7 Apr 2013 13:58:16 +0000
(15:58 +0200)
committer
Michael Natterer
<mitch@gimp.org>
Sun, 7 Apr 2013 13:58:16 +0000
(15:58 +0200)
extensions/HSV.c
patch
|
blob
|
history
diff --git
a/extensions/HSV.c
b/extensions/HSV.c
index d4cf4c4b04baeb8f1766a03c4f94435d55caad0c..6185fb73940fc236682aaedfe724665177989342 100644
(file)
--- a/
extensions/HSV.c
+++ b/
extensions/HSV.c
@@
-137,7
+137,7
@@
rgba_to_hsva (char *src,
else
hue = 4.0 + (red - green) / chroma;
- hue
*= 60
.0;
+ hue
/= 6
.0;
}
((double *) dst)[0] = hue;
@@
-168,7
+168,7
@@
hsva_to_rgba (char *src,
double chroma, h_tmp, x, min;
chroma = saturation * value;
- h_tmp = hue
/ 60
.0;
+ h_tmp = hue
* 6
.0;
x = chroma * (1.0 - fabs(fmod(h_tmp, 2.0) - 1.0));
if (h_tmp < 1.0)